Flag: Tornado!
Hurricane!
|
|
OllyDbg OpenProcess() HideDebugger Detection |
Debugging |
ap0x |
hidedebugger-OpenProcess.zip |
March 11 2006 |
|
|
.386
.model flat, stdcall
option casemap :none ; case sensitive
include \masm32\include\windows.inc
include \masm32\include\user32.inc
include \masm32\include\kernel32.inc
includelib \masm32\lib\user32.lib
includelib \masm32\lib\kernel32.lib
.data
DbgNotFoundTitle db "Debugger status:",0h
DbgFoundTitle db "Debugger status:",0h
DbgNotFoundText db "Debugger not found!",0h
DbgFoundText db "Debugger found!",0h
Krnel32 db "kernel32.dll",0h
OpnProcess db "OpenProcess",0h
.code
start:
; MASM32 antiOllyDBG example
; coded by ap0x
; Reversing Labs: http://ap0x.headcoders.net
; This example can detect HideDebugger plugin because it modifies
; OpenProcess API by inserting JMP FAR (0xEA) instruction.
PUSH offset Krnel32 ;kernel32.dll
CALL GetModuleHandle
PUSH offset OpnProcess ;OpenProcess
PUSH EAX
CALL GetProcAddress
CMP BYTE PTR[EAX+6],0EAh
JE @DebuggerDetected
PUSH 40h
PUSH offset DbgNotFoundTitle
PUSH offset DbgNotFoundText
PUSH 0
CALL MessageBox
JMP @exit
@DebuggerDetected:
PUSH 30h
PUSH offset DbgFoundTitle
PUSH offset DbgFoundText
PUSH 0
CALL MessageBox
@exit:
PUSH 0
CALL ExitProcess
end start
|
|
|
|
There are 31,320 total registered users.
|
|